package com.kanhan.altvalidator;

import java.util.List;

import com.kanhan.altvalidator.tool.Checker;
import com.kanhan.altvalidator.tool.Write2Text;

public class CheckHtmlThread extends Thread {
	private String url;

	public CheckHtmlThread(String url) {
		this.url = url;
	}

	@Override
	public void run() {
		List<EntityImage> eil = Checker.doFind(url);
		if (eil != null)
			if (eil.size() > 0) {
				Write2Text.getInstance().openStream4Res();
				for (EntityImage ei : eil) {
					Write2Text.getInstance().writeLine4Res(ei.toString());
				}
				Write2Text.getInstance().closeStream4Res();
			}
		Bridge.isAnalyzing = false;
	}

}
